graphics:obj/cube_image.o obj/cube_texture_gl.o obj/error_gl.o obj/image.o \
	obj/image_texture_gl.o obj/shader_object.o obj/program_glsl.o \
	obj/render_device_fbo.o obj/framebuffer_object.o obj/utils.o \
	obj/render_buffer.o obj/camera.o obj/program_cg.o obj/error_cg.o

INC=../

OPT=-O3 -c

obj/cube_image.o:cube_image.h cube_image.cc $(INC)/common/venus.h \
	$(INC)/common/error.h
	g++ $(OPT) -I$(INC) cube_image.cc
	mv cube_image.o obj/
	
obj/cube_texture_gl.o:cube_texture_gl.h cube_texture_gl.cc error_gl.h\
	$(INC)/common/venus.h $(INC)/common/error.h 
	g++ $(OPT) -I$(INC) cube_texture_gl.cc
	mv cube_texture_gl.o obj/

obj/error_gl.o:error_gl.h error_gl.cc $(INC)/common/venus.h \
	$(INC)/common/error.h
	g++ $(OPT) -I$(INC) error_gl.cc
	mv error_gl.o obj/

obj/error_cg.o:error_cg.h error_cg.cc $(INC)/common/venus.h \
	$(INC)/common/error.h
	g++ $(OPT) -I$(INC) error_cg.cc
	mv error_cg.o obj/

obj/image.o:image.h image.cc $(INC)/common/venus.h \
	$(INC)/common/error.h
	g++ $(OPT) -I$(INC) image.cc
	mv image.o obj/

obj/image_texture_gl.o:image_texture_gl.h image_texture_gl.cc error_gl.h\
	$(INC)/common/venus.h $(INC)/common/error.h
	g++ $(OPT) -I$(INC) image_texture_gl.cc
	mv image_texture_gl.o obj/

obj/shader_object.o:shader_object.h shader_object.cc error_gl.h\
	$(INC)/common/venus.h $(INC)/common/error.h
	g++ $(OPT) -I$(INC) shader_object.cc
	mv shader_object.o obj/

obj/program_glsl.o:program_glsl.h program_glsl.cc error_gl.h\
	$(INC)/common/venus.h $(INC)/common/error.h
	g++ $(OPT) -I$(INC) program_glsl.cc
	mv program_glsl.o obj/

obj/program_cg.o:program_cg.h program_cg.cc error_gl.h\
	$(INC)/common/venus.h $(INC)/common/error.h
	g++ $(OPT) -I$(INC) program_cg.cc
	mv program_cg.o obj/

obj/framebuffer_object.o:framebuffer_object.h framebuffer_object.cc error_gl.h\
	$(INC)/common/venus.h $(INC)/common/error.h
	g++ $(OPT) -I$(INC) framebuffer_object.cc
	mv framebuffer_object.o obj/

obj/render_device_fbo.o:render_device_fbo.h render_device_fbo.cc error_gl.h\
	image_texture_gl.h $(INC)/common/venus.h $(INC)/common/error.h
	g++ $(OPT) -I$(INC) render_device_fbo.cc
	mv render_device_fbo.o obj/

obj/render_buffer.o:render_buffer.h render_buffer.cc error_gl.h\
	$(INC)/common/venus.h $(INC)/common/error.h
	g++ $(OPT) -I$(INC) render_buffer.cc
	mv render_buffer.o obj/

obj/utils.o:utils.h utils.cc error_gl.h $(INC)/common/venus.h \
	$(INC)/common/error.h $(INC)/shapes/triangle_mesh.h $(INC)/geometry/point.h
	g++ $(OPT) -I$(INC) utils.cc
	mv utils.o obj/

obj/camera.o:camera.h camera.cc $(INC)/common/venus.h \
	$(INC)/geometry/point.h $(INC)/geometry/matrix4x4.h
	g++ $(OPT) -I$(INC) camera.cc
	mv camera.o obj/

clean:
	rm -f obj/*.o
